package com.bskj.common.bean.vo;

import com.alibaba.fastjson.JSONObject;
import com.bskj.common.utils.StringUtils;

public class WechatPayVo {
	private String appId;
	private String merchantCode;
	private String storeCode;
	private String operator;
	private String channel = "WECHAT_OFFICE_ACCOUNT";
	private String clientIp;
	private String amount;
	private String ccy = "cny";
	private String notifyUrl;
	private String signType = "MD5";
	private String signKey;
	private String subAppId = "wxa5337aa97b8fea09";
	private String subOpenId;
	private String parkLotName;
	private String outTradeNo;

	public WechatPayVo(String appId, String merchantCode, String storeCode, String operator, String signType,
			String signKey, String parkLotName) {
		this.appId = appId;
		this.merchantCode = merchantCode;
		this.storeCode = storeCode;
		this.operator = operator;
		this.signType = signType;
		this.signKey = signKey;
		this.parkLotName = parkLotName;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getMerchantCode() {
		return merchantCode;
	}

	public void setMerchantCode(String merchantCode) {
		this.merchantCode = merchantCode;
	}

	public String getStoreCode() {
		return storeCode;
	}

	public void setStoreCode(String storeCode) {
		this.storeCode = storeCode;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public String getChannel() {
		return channel;
	}

	public void setChannel(String channel) {
		this.channel = channel;
	}

	public String getClientIp() {
		return clientIp;
	}

	public void setClientIp(String clientIp) {
		this.clientIp = clientIp;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getCcy() {
		return ccy;
	}

	public void setCcy(String ccy) {
		this.ccy = ccy;
	}

	public String getNotifyUrl() {
		return notifyUrl;
	}

	public void setNotifyUrl(String notifyUrl) {
		this.notifyUrl = notifyUrl;
	}

	public String getSignType() {
		return signType;
	}

	public void setSignType(String signType) {
		this.signType = signType;
	}

	public String getParkLotName() {
		return parkLotName;
	}

	public void setParkLotName(String parkLotName) {
		this.parkLotName = parkLotName;
	}

	public String getOutTradeNo() {
		return outTradeNo;
	}

	public void setOutTradeNo(String outTradeNo) {
		this.outTradeNo = outTradeNo;
	}

	public String getBody() {
		return getDescription();
	}

	public String getDescription() {
		return parkLotName + "-停车费用";
	}
	
	public String getSubject() {
		return getDescription();
	}

	public String getSign() {
		if(StringUtils.isBank(signKey)) {
			return "";
		}
		//TODO 签名
		return "";
	}

	public String getExtra() {
		JSONObject dataJson = new JSONObject();
		dataJson.put("sub_open_id", subOpenId);
		dataJson.put("sub_app_id", subAppId);
		return dataJson.toJSONString();
	}

	public void setSignKey(String signKey) {
		this.signKey = signKey;
	}

	public void setSubAppId(String subAppId) {
		this.subAppId = subAppId;
	}

	public void setSubOpenId(String subOpenId) {
		this.subOpenId = subOpenId;
	}
}
